#include <bits/stdc++.h>
using namespace std;

int main() {
    ios::sync_with_stdio(false);cin.tie(nullptr);
    int n; cin >> n;
    bool flg = true;

    int minn = INT_MAX;
    vector<int> ans;
    set<int> s;
    for (int i = 1; i <= n ; ++i) {
        s.insert(i);
    }
    int toadd = 0, cnt = 0;
    bool todo = false;
    for (int i = 0; i < 2*n; ++i) {
        char c; cin >> c;
        if(c=='+') {
            if(todo){
                while (toadd) {
                    int big = *(--s.end());
                    ans.push_back(big);
                    s.erase(big);
                    --toadd;
                }
                todo = false;
            }
            ++toadd, ++cnt;
            minn = INT_MAX;
        }
        else{
            todo = true;
            int w; cin >> w;
            if(minn < INT_MAX && w < minn) {
                flg = false; break;}
            if(cnt==0){
                flg = false; break;}

            if(s.count(w))
                ans.push_back(w), s.erase(w), --toadd;

            --cnt, minn = min(minn, w);
        }
    }
    if(flg) {
        cout << "YES\n";
        for (int i = 0; i < ans.size(); ++i) {
            if(i) cout << ' ';
            cout << ans[i];
        }
    }
    else cout << "NO\n";
    return 0;
}